# This program can be compiled by Mingw32 and linux gcc
include Makefile.param

CXX:=g++
CXXFLAGS+=-O2 -Wall -Iinclude -Iiniparser
LD:=g++


%.o:%.cpp
	@echo Compiling $@ ...
	@$(CXX) -c $(CXXFLAGS) -o $@ $<

OBJS=MakeFwing.o HuffPack.o MakeFwing_porting.o
LIBS=iniparser/libini.a 



all: all-before $(BIN) all-after
	

all-before: iniparser/libini.a
	

all-after:	
	@echo DONE@$(DATE)

iniparser/libini.a:
	make -C ./iniparser

$(BIN):$(OBJS)
	@echo Linking $@ ...
	@$(LD) -s -municode -o $(BIN) $(OBJS) $(LIBS)
	
clean: 
	@$(RM) $(OBJS) $(BIN)
	@make clean -C ./iniparser

DBG:
	@echo $(RM) $(DATE)